package com.eascs.spider.ant.common.kafka;

import java.util.Map;

import org.apache.kafka.common.serialization.Serializer;

import com.eascs.spider.ant.common.util.ObjectUtil;

public class EncodeingKafka implements Serializer<Object>{
	@Override  
    public void configure(Map configs, boolean isKey) {  
          
    }  
    @Override  
    public byte[] serialize(String topic, Object data) {  
        return ObjectUtil.ObjectToByte(data);  
    }  
    /* 
     * producer调用close()方法是调用 
     */  
    @Override  
    public void close() {  
        System.out.println("EncodeingKafka is close");  
    } 
}
